package org.abhigarde.personalexpense.dao;

import java.math.BigDecimal;
import java.sql.Date;

public class TestDAOs {

	public static void main(String[] args) {
		ExpenseDAO edao = new ExpenseDAO();
		long expenseId1 = edao.saveExpense("Sports1", "Futbol1",
				new BigDecimal(201), new Date(System.currentTimeMillis()));
		long expenseId2 = edao.saveExpense("Sports2", "Futbol2", new BigDecimal(202), new Date(
				System.currentTimeMillis()));
		long expenseId3 = edao.saveExpense("Sports3", "Futbol3",
				new BigDecimal(203), new Date(System.currentTimeMillis()));
		long expenseId4 = edao.saveExpense("Sports4", "Futbol4",
				new BigDecimal(204), new Date(System.currentTimeMillis()));

		edao.listExpenses();

		edao.updateExpense(expenseId2, "Furniture", "Sofa", new BigDecimal(30));

		edao.listExpenses();

		edao.deleteExpense(expenseId1);

		edao.listExpenses();
	}
}
